import { App } from 'vue'
import { formatUtcString } from '@/utils/date-format'

export default function registerProperties(app: App): void {
  app.config.globalProperties.$filters = {
    foo() {
      console.log('foo')
    },
    formatTime(date: string) {
      return formatUtcString(date)
    }
  }
}

declare module '@vue/runtime-core' {
  interface ComponentCustomProperties {
    // eslint-disable-next-line @typescript-eslint/no-explicit-any
    $filters: any
  }
}
